Conversation
colonykit-in-colony: a spec-driven dev lane that rides on @colony/core's
TaskThread, ProposalSystem, and MemoryStore instead of introducing
parallel infrastructure.
**packages/spec/** (new workspace package):
- grammar.ts — SPEC.md parser / serializer, §G §C §I §V §T §B
sections, always-on invariants (`.always` id suffix),
FNV-1a stable hash
- change.ts — CHANGE.md with §P §S §T §B plus base_root_hash
front-matter for three-way merge
- sync.ts — three-way merge with three strategies: three_way
(default), refuse_on_conflict, last_writer_wins
- backprop.ts — failure-signature gate (test-id + error-class +
top-3 frames). Promotes a §V draft via
ProposalSystem only after promote_after matches
(default 2) — no flake-driven invariant churn
- context.ts — cite-scoped context loader; resolves a §T id to
its transitive closure of cites plus §V.always
- repository.ts — filesystem ↔ MemoryStore bridge, atomic archive
via tempdir-then-rename so a crash mid-move leaves
either the archived or the pre-archive state
- hash.ts — base_root_hash computation + verification
- constants.ts — SPEC_OBSERVATION_KINDS, SPEC_BRANCH_PREFIX
**apps/mcp-server/src/tools/spec.ts** (new):
Six MCP tools — spec_read, spec_change_open, spec_change_add_delta,
spec_build_context, spec_build_record_failure, spec_archive — wired
in via the same `register(server, ctx)` pattern as the other tool
groups. Uses MemoryStore.addObservation directly for spec-kind
observations so we don't need to widen TaskThread.post's kind enum.
**skills/**: /co:change, /co:build, /co:check, /co:archive definitions
for Claude Code users who want to drive the spec flow via slash
commands. Not loaded by any runtime — consumed by hand when a user
opts in.
Tests: packages/spec covers grammar round-trip, always-on detection,
stable hashing, cite-scope transitive closure, all four sync conflict
shapes (10/10 green). apps/mcp-server listTools assertion extended
with the six new tools (17/17 green).
This change intentionally does NOT add: colonykit init CLI, token-
budget CI gate, design.md scaffolding, or cross-change concurrent-edit
detection. Prove the core loop on one change before adding surface.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated by gx branch finish (PR flow).